package com.gdk.auth.common.enums;

import lombok.Getter;

/**
 * 用户状态枚举
 *
 * @author Gudong~
 * @create 2024-10-21 16:20
 */
@Getter
public enum AuthUserStatusFlagEnum {

    OPEN(0,"启用"),
    CLOSE(1,"禁用");

    public int code;

    public String desc;

    AuthUserStatusFlagEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static AuthUserStatusFlagEnum getByCode(int codeVal){
        for (AuthUserStatusFlagEnum resultCodeEnum : AuthUserStatusFlagEnum.values()) {
            if (resultCodeEnum.code == codeVal) {
                return resultCodeEnum;
            }
        }
        return null;
    }

}
